//自选页--自选基金操作（增删改）：/get-pick-list-update
import http from 'k6/http';
import { sleep } from 'k6';
import { URL } from './config.js';

export const options = {
    vus:1000,
    duration:'60s'
};

export default function () {
    const url=`${URL}/api/get-pick-list-update`;
    const payload=JSON.stringify(
    {
        "unionId":"o896o5_scUqyJKkRTR1z9Wbm4V98",
        "type":"move-pick-group",
        "codeArr":["011175"],
        "groupList":["c1d99f76-03bd-4353-93a8-db9f1df7f7dc"],
        "groupId":"37e31c50-2b8d-47f8-9716-ca21a9b753f2",
        "version":"3.4.0.X"}
    );
  const res = http.post(url,payload,{headers:{'Content-Type': 'application/json' }});
  console.log('状态码:', res.status);   // 200
  console.log('返回体:', res.body);     // 原始字符串
  // sleep() 函数作为多个串联请求的思考时间
  sleep(1);
}